package com.shenjialin.Map;

import com.shenjialin.util.Constant;
import com.shenjialin.util.MyUtil;

import java.awt.*;
import java.util.*;
import java.util.List;

/**
 * 玩家坦克的 大本营
 */
public class TankHouse {
    public static final int HOUSE_X = Constant.FRAME_WIDTH - 8 * MapTile.tileW;
    //public static final int HOUSE_Y = Constant.FRAME_HEIGHT - 2 * MapTile.tileW;
    public static final int HOUSE_Y = Constant.FRAME_HEIGHT - 2 * MapTile.tileW;
    // 六块地图块
    private List<MapTile> tileList = new ArrayList<>();
    public TankHouse () {
        int W = MapTile.tileW;
        tileList.add(new MapTile(HOUSE_X,HOUSE_Y));
        tileList.add(new MapTile(HOUSE_X,HOUSE_Y + W));
        tileList.add(new MapTile(HOUSE_X + W,HOUSE_Y));
        tileList.add(new MapTile(HOUSE_X + W*2,HOUSE_Y));
        tileList.add(new MapTile(HOUSE_X + W*2,HOUSE_Y + W));
        tileList.add(new MapTile(HOUSE_X + W,HOUSE_Y + W));
        for (int i = 0; i < tileList.size() - 1; i++) {
            tileList.get(i).setTileType(MapTile.TILE_TYPE1);
        }
        tileList.get(tileList.size() - 1).setTileType(MapTile.TILE_TYPE0);
        tileList.get(tileList.size() - 1).setName("死");
    }

    public List<MapTile> getTileList() {
        return tileList;
    }

    public void draw (Graphics graphics){
        for (MapTile tile : tileList) {
            tile.draw(graphics);
        }
    }
}
/*
20000000000002
22222111122222
22222111122222
22222222222222
22222111122222
22222111122222
22222111122222
22222111122222
22222222222222
22222111122222
00000000000000


 */

